package com.tuanzi.loan.web.lazy.settlementsystem;

import com.tuanzi.loan.business.service.settlementsystem.SettlementBillService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.settlementsystem.SettlementBillRequest;
import com.tuanzi.loan.vo.response.settlementsystem.SettlementBillResponse;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-01-25 20:17
 */
public class SettlementBillLazyDataModel extends BaseLazyDataModel<SettlementBillRequest,SettlementBillResponse> {
    private SettlementBillService settlementBillService = SpringContextHolder.getBean(SettlementBillService.class);
    public SettlementBillLazyDataModel(SettlementBillRequest settlementBillRequest) {
        super(settlementBillRequest);
    }
    @Override
    protected Page<SettlementBillResponse> doLoad(PageSearcher<SettlementBillRequest> pageSearcher) {
        return settlementBillService.list(pageSearcher);
    }
}
